package java67_adv6;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class InputStreamTest5 {

	public static void main(String[] args) {

		InputStream f = null;
		try {
			f = new FileInputStream("src/java67_adv6/FileTest2.java");
			byte b[] = new byte[f.available()];
			int len = 0;
			len = f.read(b);// 一次读完
			String str = new String(b, 0, len);
			System.out.println(str);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			try {
				if (f != null)
					f.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

	}

}
